 <?php 
		session_start(); 
		include "function/libfunc.php";
 			if (!empty($_SESSION['username']) && !empty($_SESSION['password'])) { 
		  	$link="Media";
		  	include 'themes/head2.php';
			include 'themes/heading.php';
?>  
<style type="text/css">
.upload_form_cont {
 
	width:840px;
}
#upload_form {
    float:left;
    padding:20px;
    width:500px;
}
#preview {
    background-color:#fff;
    display:block;
    float:right;
    width:300px;
    height:260px;
    margin-top:30px;
}
#upload_form > div {
    margin-bottom:10px;
}
#speed,#remaining {
    float:left;
    width:100px;
}
#b_transfered {
    float:right;
    text-align:right;
}
.clear_both {
    clear:both;
}
input {

}
input[type=button] {
    background: -moz-linear-gradient(#ffffff, #dfdfdf);
    background: -ms-linear-gradient(#ffffff, #dfdfdf);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #dfdfdf));
    background: -webkit-linear-gradient(#ffffff, #dfdfdf);
    background: -o-linear-gradient(#ffffff, #dfdfdf);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dfdfdf');
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dfdfdf')";
    background: linear-gradient(#ffffff, #dfdfdf);
}
#image_file {
	width:300px;
   
}
#progress_info {
    font-size:10pt;
}
#fileinfo,#error,#error2,#abort,#warnsize {
    color:#aaa;
    display:none;
    font-size:10pt;
    font-style:italic;
    margin-top:10px;
}
#progress {
    border:1px solid #ccc;
    display:none;
    float:left;
    height:14px;

    border-radius:10px;
    -moz-border-radius:10px;
    -ms-border-radius:10px;
    -o-border-radius:10px;
    -webkit-border-radius:10px;

    background: -moz-linear-gradient(#66cc00, #4b9500);
    background: -ms-linear-gradient(#66cc00, #4b9500);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #66cc00), color-stop(100%, #4b9500));
    background: -webkit-linear-gradient(#66cc00, #4b9500);
    background: -o-linear-gradient(#66cc00, #4b9500);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#66cc00', endColorstr='#4b9500');
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#66cc00', endColorstr='#4b9500')";
    background: linear-gradient(#66cc00, #4b9500);
}
#progress_percent {
    float:right;
}
#upload_response {
    margin-top: 10px;
    padding: 20px;
    overflow: hidden;
    display: none;
    border: 1px solid #ccc;

}

</style>
                    <!-- Build page from here: -->
                   
                    <div class="row-fluid">

                        <div class="span12">

                            <div class="box gradient">
                                <div class="title">
                                    <h4>
                                        <span class="icon16 icomoon-icon-folder"></span>
                                        <span>File manager </span>
                                    </h4>
                                </div>
                                <div class="content noPad">
                                    <div id="elfinder"></div>
                                </div>

                            </div><!-- End .box -->

                        </div><!-- End .span12 -->

                    </div><!-- End .row-fluid -->

                    <div class="row-fluid">

                        <div class="span12">

                            <div class="box gradient">
                                <div class="title">
                                    <h4>
                                        <span class="icon16 icomoon-icon-upload"></span>
                                        <span>Upload manager</span>
                                    </h4>
                                </div> 
                                
                                <div class="upload_form_cont">
                                  <form id="upload_form" enctype="multipart/form-data" method="post" action="upload.php">
                                  
                                 <div class="form-row row-fluid">
                                            <div class="span8">
                                                <div class="row-fluid">
                                                    <label class="form-label span4" for="checkboxes">Jenis</label>
                                                    <div class="span8 controls">       
                                                        <select name="jenis" id="select">
                                                            <option value="0">- pilih -</option>
                                                            <option value="Member">Member</option>
                                                            <option value="Produk">Produk</option>
                                                            <option value="Lain">Lain</option>
                                                        </select>
                                                    </div> 
                                                </div>
                                            </div> 
                                        </div>
                                        
                                     <div class="form-row row-fluid">
                                            <div class="span8">
                                                <div class="row-fluid">
                                                    <label class="form-label span4" for="focusedInput">Kode</label>
                                                    <input name="idmedia" class="span7 focused" id="txtnama" type="text" required />
                                                </div>
                                            </div>
                                        </div>
                                        
                                
                                <div class="form-row row-fluid">
                                            <div class="span8">
                                                <div class="row-fluid">
                                                    <label class="form-label span4" for="textarea">Deskripsi</label>
                                                    <textarea name="deskripsi" class="span8 limit" id="deskripsi" rows="3"></textarea>
                                                </div>
                                            </div>  
                                        </div>
                                        
                                        <div class="form-row row-fluid">
                                            <div class="span8">
                                                <div class="row-fluid">
                                                   <label class="form-label span4" for="file">File</label>
                                                    <input type="file" name="image_file" id="image_file" onChange="fileSelected();" />
                                                </div>
                                            </div>  
                                        </div>
                                        
                                        <div class="form-actions">
                                           <button type="button" class="btn" onClick="startUploading()" >Upload</button>
                                           <button type="button" class="btn" onClick="javascript:history.back()">Batalkan</button>
                                        </div>
                    <div id="fileinfo">
                        <div id="filename"></div>
                        <div id="filesize"></div>
                        <div id="filetype"></div>
                        <div id="filedim"></div>
                    </div>
                    <div id="error">You should select valid image files only!</div>
                    <div id="error2">An error occurred while uploading the file</div>
                    <div id="abort">The upload has been canceled by the user or the browser dropped the connection</div>
                    <div id="warnsize">Your file is very big. We can't accept it. Please select more small file</div>

                    <div id="progress_info">
                        <div id="progress"></div>
                        <div id="progress_percent">&nbsp;</div>
                        <div class="clear_both"></div>
                        <div>
                            <div id="speed">&nbsp;</div>
                            <div id="remaining">&nbsp;</div>
                            <div id="b_transfered">&nbsp;</div>
                            <div class="clear_both"></div>
                        </div>
                        <div id="upload_response"></div>
                </form>
                </div>

                <img id="preview" />

                            </div><!-- End .box -->

                        </div><!-- End .span12 -->

                    </div><!-- End .row-fluid -->
                    <script type="text/javascript" src="plugins/files/upload.js"></script>
 
                     
                        <!-- File upload & file manager plugins -->
					<script type="text/javascript" src="plugins/files/elfinder/elfinder.min.js"></script>
                    <script type="text/javascript" src="themes/adminv1/js/file.js"></script>

<?php
include 'themes/footer.php';
}else {
echo "<script language='javascript'>window.location = '../admin/'</script>";
}
?>